import React from 'react';
<% if (useRedux) {-%>
import { createStore } from 'redux';
import { Provider } from 'react-redux';
<% } -%>
<% if (useReactRouter) {-%>
import { HashRouter, Switch, Route } from 'react-router-dom';
<% } -%>

import * as LP from 'LP';
import * as LPUI from 'LPUI';

import error from '';
<% if (useRedux) {-%>
import reducers from '';
const store = createStore(reducers);
<% } -%>

LP.error.init(error);

/**
* <%= title %>
* @author
* @return {JSX.Element}
*/
function Main() {
  return  (
<% if (useRedux) {-%>
    <Provider store={store} >
<% } -%>
<% if (useReactRouter) {-%>
      <HashRouter>
<% } -%>
<% if (useReactRouter) {-%>
        <Switch>
<% } -%>
<% if (useReactRouter) {%>    <% } %><% if (useRedux) {%>  <% } %>    <% if (useReactRouter) {%><Route path="" component={}/><% } %>
<% if (useReactRouter) {-%>
        </Switch>
<% } -%>
<% if (useReactRouter) {-%>
      </HashRouter>
<% } -%>
<% if (useRedux) {-%>
    </Provider>
<% } -%>
  );
}

LPUI.dg.init(Main);